package ClassExercise;

public class Cylinder {
    private double H;
    public Cylinder(){

    }
    public Cylinder(double H){
        this.H=H;
    }

    public void setH(double h) {
        H = h;
    }

    public double getH() {
        return H;
    }

    public double calculateArea(){
        throw new RuntimeException("您要具体继承这个类的子类中重写这个方法才可以算体积,因为这个方法不知道圆柱是什么类型的底哦");
    }
}
